#ifndef PLUGINCONTAINERWIDGET_H
#define PLUGINCONTAINERWIDGET_H

#include <QWidget>
#include "IPluginDialog.h"

#include <QLabel>
#include <QVBoxLayout>

using namespace CVV::Interface;
namespace Ui {
class PluginContainerWidget;
}


class PluginContainerWidget : public QDialog
{
    Q_OBJECT

public:
    explicit PluginContainerWidget(IPluginDialog *dlg = nullptr, QWidget *parent = 0);
    virtual ~PluginContainerWidget();

    void setPluginDialog(IPluginDialog *dlg);
    void reset();
    void setRuntimeVisible(bool isVisi);
public slots:
    void sltUpdateRuntime(float timeMs);

protected:
    void closeEvent(QCloseEvent *ev);

private:
    Ui::PluginContainerWidget *ui;

    QLabel *m_runtimeLabel{nullptr};
    QLabel *label{nullptr};
    QVBoxLayout *vbLay{nullptr};
    QHBoxLayout *runtimeLay{nullptr};
    IPluginDialog *m_curDlg{nullptr};

};

#endif // PLUGINCONTAINERWIDGET_H
